package lab01;

/**
 * Created by Administrator on 2017/9/28.
 */
public class Text05 {
    public static void main(String[] args) {
        int sum = 0;
        int i = 1;
        //for(i;i<=100;i++){
        //sum=sum+i;
        //}
        // System.out.println("和是："+sum);
        // }
        //while (i <= 100) {
        //sum = sum + i;
        //i++;
        //}
        //System.out.println("和是：" + sum);
        //}
        do {
            sum = sum +i;
            i++;
        }
        while (i <= 100);
        System.out.println("和是：" + sum);
    }
}


